package com.anolesoft.amljmes.fortyone.service.mapper;

import com.anolesoft.amljmes.fortyone.dto.MesStoveQualityDto;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;

public interface MesStoveQualityServiceMapper {
    @Update("    update mes_stove_quality" +
            "      set pmd = #{pmd, jdbcType=VARCHAR},zxd = #{zxd, jdbcType=VARCHAR},ccd = #{ccd, jdbcType=VARCHAR}, qxjmc=#{qxjmc, jdbcType=VARCHAR},sbbh=#{sbbh, jdbcType=VARCHAR},qxwd= #{qxwd, jdbcType=VARCHAR}," +
            "gzfs=#{gzfs, jdbcType=VARCHAR}, gzwd=#{gzwd, jdbcType=VARCHAR}, gzsj=#{gzsj, jdbcType=VARCHAR},cxdj=#{cxdj, jdbcType=VARCHAR}, ydz_hrc=#{ydzHrc, jdbcType=VARCHAR}, " +
            "ydz_hra=#{ydzHra, jdbcType=VARCHAR}, ydz_hr15n=#{ydzHr15n, jdbcType=VARCHAR}, ydz_hb=#{ydzHb, jdbcType=VARCHAR},ydz_hv=#{ydzHv, jdbcType=VARCHAR}, jzqpmd=#{jzqpmd, jdbcType=VARCHAR}," +
            "jzqzxd=#{jzqzxd, jdbcType=VARCHAR}, jzhpmd=#{jzhpmd, jdbcType=VARCHAR}, jzhzxd=#{jzhzxd, jdbcType=VARCHAR},jxxnlhsybgbh=#{jxxnlhsybgbh, jdbcType=VARCHAR}, jxjclhsybgbh=#{jxjclhsybgbh, jdbcType=VARCHAR}," +
            "bmys=#{bmys, jdbcType=VARCHAR}, dydstwd=#{dydstwd, jdbcType=VARCHAR}, dydstsj=#{dydstsj, jdbcType=VARCHAR},dydstts=#{dydstts, jdbcType=VARCHAR}, dedstwd=#{dedstwd, jdbcType=VARCHAR}," +
            "dedstsj=#{dedstsj, jdbcType=VARCHAR},dedstts=#{dedstts, jdbcType=VARCHAR},dygsyqcsj=#{dygsyqcsj, jdbcType=VARCHAR},dygsyschd=#{dygsyschd, jdbcType=VARCHAR},degsyqcsj=#{degsyqcsj, jdbcType=VARCHAR}, " +
            "degsyschd=#{degsyschd, jdbcType=VARCHAR},dsgsyqcsj=#{dsgsyqcsj, jdbcType=VARCHAR},dsgsyschd=#{dsgsyschd, jdbcType=VARCHAR},llts=#{llts, jdbcType=VARCHAR},clwd=#{clwd, jdbcType=VARCHAR}, " +
            "bmhhwd=#{bmhhwd, jdbcType=VARCHAR},bmhhsj=#{bmhhsj, jdbcType=VARCHAR}, yyhwd=#{yyhwd, jdbcType=VARCHAR},yyhsj=#{yyhsj, jdbcType=VARCHAR},dydstjrwd=#{dydstjrwd, jdbcType=VARCHAR}," +
            "dydstbwsj=#{dydstbwsj, jdbcType=VARCHAR}, dydstafjl=#{dydstafjl, jdbcType=VARCHAR}, dedstjrwd=#{dedstjrwd, jdbcType=VARCHAR}, dedstbwsj=#{dedstbwsj, jdbcType=VARCHAR},dedstafjl=#{dedstafjl, jdbcType=VARCHAR}, " +
            "dsdstjrwd=#{dsdstjrwd, jdbcType=VARCHAR}, dsdstbwsj=#{dsdstbwsj, jdbcType=VARCHAR}, dsdstafjl=#{dsdstafjl, jdbcType=VARCHAR}, qljzmc=#{qljzmc, jdbcType=VARCHAR},zkgzyl=#{zkgzyl, jdbcType=VARCHAR}," +
            "dydjrwd=#{dydjrwd, jdbcType=VARCHAR}, dydjrbwsj=#{dydjrbwsj, jdbcType=VARCHAR}, dedjrwd=#{dedjrwd, jdbcType=VARCHAR}, dedjrbwsj=#{dedjrbwsj, jdbcType=VARCHAR},dsdjrwd=#{dsdjrwd, jdbcType=VARCHAR}, " +
            "dsdjrbwsj=#{dsdjrbwsj, jdbcType=VARCHAR},  dsidjrwd=#{dsidjrwd, jdbcType=VARCHAR}, dsidjrbwsj= #{dsidjrbwsj, jdbcType=VARCHAR}, lqfs=#{lqfs, jdbcType=VARCHAR},shuiwen=#{shuiwen, jdbcType=VARCHAR},  " +
            "youwen=#{youwen, jdbcType=VARCHAR},  lpqtmc=#{lpqtmc, jdbcType=VARCHAR},  tqyq=#{tqyq, jdbcType=VARCHAR},  zysj=#{zysj, jdbcType=VARCHAR}," +
            "sbbhdedjrbw=#{sbbhdedjrbw, jdbcType=VARCHAR},sbbhdsdjrbw=#{sbbhdsdjrbw, jdbcType=VARCHAR},sbbhdsidjrbw=#{sbbhdsidjrbw, jdbcType=VARCHAR})"+
            "    where objuid = #{objuid, jdbcType=VARCHAR}"
    )
    int updateMesStoveQuality(MesStoveQualityDto inFoDtoParam);

    // 根据炉次id查主键
    @Select("select objuid from mes_stove_quality where stoye_fabinfo_obj=#{stoyeFabinfoObj, jdbcType=VARCHAR}")
    MesStoveQualityDto queryMesStoveQualityById(String stoyeFabinfoObj);

    // 根据炉次id查制造记录条码
    @Select("select fortyone_code from mes_stove_quality where stoye_fabinfo_obj=#{stoyeFabinfoObj, jdbcType=VARCHAR}")
    List<MesStoveQualityDto> queryMesStoveQualityByCode(String StoveFabinfoObj);


    @Insert("    insert into mes_stove_quality" +
            "      (objuid, stoye_fabinfo_obj, cjr, factory_id, pmd," +
            " zxd, ccd, qxjmc, sbbh, qxwd, " +
            "gzfs, gzwd, gzsj, cxdj, ydz_hrc," +
            " ydz_hra, ydz_hr15n, ydz_hb, ydz_hv, jzqpmd, " +
            "jzqzxd, jzhpmd, jzhzxd, jxxnlhsybgbh, jxjclhsybgbh," +
            "bmys, dydstwd, dydstsj, dydstts, dedstwd, " +
            "dedstsj, dedstts, dygsyqcsj, dygsyschd, degsyqcsj," +
            " degsyschd, dsgsyqcsj, dsgsyschd, llts, clwd, " +
            "bmhhwd, bmhhsj, yyhwd, yyhsj, dydstjrwd, " +
            "dydstbwsj, dydstafjl, dedstjrwd, dedstbwsj, dedstafjl, " +
            "dsdstjrwd, dsdstbwsj, dsdstafjl, qljzmc, zkgzyl, " +
            "dydjrwd, dydjrbwsj, dedjrwd, dedjrbwsj, dsdjrwd, " +
            "dsdjrbwsj, dsidjrwd, dsidjrbwsj, lqfs, shuiwen, " +
            "youwen, lpqtmc, tqyq, zysj, sbbhdedjrbw, " +
            "sbbhdsdjrbw, sbbhdsidjrbw,fortyone_code)" +
            "    values" +
            "      (sys_guid(),#{stoyeFabinfoObj, jdbcType=VARCHAR},#{cjr, jdbcType=VARCHAR}, #{factoryId, jdbcType=VARCHAR}, #{pmd, jdbcType=VARCHAR}," +
            "#{zxd, jdbcType=VARCHAR}, #{ccd, jdbcType=VARCHAR}, #{qxjmc, jdbcType=VARCHAR},#{sbbh, jdbcType=VARCHAR}, #{qxwd, jdbcType=VARCHAR}," +
            "#{gzfs, jdbcType=VARCHAR}, #{gzwd, jdbcType=VARCHAR}, #{gzsj, jdbcType=VARCHAR},#{cxdj, jdbcType=VARCHAR}, #{ydzHrc, jdbcType=VARCHAR}, " +
            "#{ydzHra, jdbcType=VARCHAR}, #{ydzHr15n, jdbcType=VARCHAR}, #{ydzHb, jdbcType=VARCHAR},#{ydzHv, jdbcType=VARCHAR}, #{jzqpmd, jdbcType=VARCHAR}," +
            "#{jzqzxd, jdbcType=VARCHAR}, #{jzhpmd, jdbcType=VARCHAR}, #{jzhzxd, jdbcType=VARCHAR},#{jxxnlhsybgbh, jdbcType=VARCHAR}, #{jxjclhsybgbh, jdbcType=VARCHAR}," +
            "#{bmys, jdbcType=VARCHAR}, #{dydstwd, jdbcType=VARCHAR}, #{dydstsj, jdbcType=VARCHAR},#{dydstts, jdbcType=VARCHAR}, #{dedstwd, jdbcType=VARCHAR}," +
            "#{dedstsj, jdbcType=VARCHAR},#{dedstts, jdbcType=VARCHAR},#{dygsyqcsj, jdbcType=VARCHAR},#{dygsyschd, jdbcType=VARCHAR},#{degsyqcsj, jdbcType=VARCHAR}, " +
            "#{degsyschd, jdbcType=VARCHAR},#{dsgsyqcsj, jdbcType=VARCHAR},#{dsgsyschd, jdbcType=VARCHAR},#{llts, jdbcType=VARCHAR},#{clwd, jdbcType=VARCHAR}, " +
            "#{bmhhwd, jdbcType=VARCHAR},#{bmhhsj, jdbcType=VARCHAR}, #{yyhwd, jdbcType=VARCHAR},#{yyhsj, jdbcType=VARCHAR},#{dydstjrwd, jdbcType=VARCHAR}," +
            "#{dydstbwsj, jdbcType=VARCHAR}, #{dydstafjl, jdbcType=VARCHAR}, #{dedstjrwd, jdbcType=VARCHAR}, #{dedstbwsj, jdbcType=VARCHAR},#{dedstafjl, jdbcType=VARCHAR}, " +
            "#{dsdstjrwd, jdbcType=VARCHAR}, #{dsdstbwsj, jdbcType=VARCHAR}, #{dsdstafjl, jdbcType=VARCHAR}, #{qljzmc, jdbcType=VARCHAR},#{zkgzyl, jdbcType=VARCHAR}," +
            "#{dydjrwd, jdbcType=VARCHAR}, #{dydjrbwsj, jdbcType=VARCHAR}, #{dedjrwd, jdbcType=VARCHAR}, #{dedjrbwsj, jdbcType=VARCHAR},#{dsdjrwd, jdbcType=VARCHAR}, " +
            "#{dsdjrbwsj, jdbcType=VARCHAR},  #{dsidjrwd, jdbcType=VARCHAR},  #{dsidjrbwsj, jdbcType=VARCHAR},  #{lqfs, jdbcType=VARCHAR},#{shuiwen, jdbcType=VARCHAR},  " +
            "#{youwen, jdbcType=VARCHAR},  #{lpqtmc, jdbcType=VARCHAR},  #{tqyq, jdbcType=VARCHAR},  #{zysj, jdbcType=VARCHAR}," +
            "#{sbbhdedjrbw, jdbcType=VARCHAR},#{sbbhdsdjrbw, jdbcType=VARCHAR},#{sbbhdsidjrbw, jdbcType=VARCHAR},#{fortyone_code, jdbcType=VARCHAR})"
    )
    int addMesStoveQuality(MesStoveQualityDto inFoDtoParam);
}
